home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / tspa3540.zip / TSUNTF.INT < prev    next >
Text File  |  1996-09-07  |  4KB  |  103 lines

  1. {$B-,F-,I+,N-,V+}
  2. {$S+}
  3. {$R-}
  4. {$D-}
  5.  
  6. (*
  7. Timo Salmi UNiT F
  8. A Turbo Pascal unit for readln with string editing, "Editable Readln"
  9. All rights reserved 19-Aug-89
  10. Updated 4-Sep-89, 24-Sep-89, 21-Mar-90, 14-Jun-90, 20-Sep-92
  11.  
  12. TSUNTF first appeared in release TSPAS13 of my Turbo Pascal units package.
  13.  
  14. This unit may be used and distributed freely for PRIVATE, NON-COMMERCIAL,
  15. NON-INSTITUTIONAL purposes, provided it is not changed in any way, and
  16. that a proper attribution is made. For ANY other usage, such as use in a
  17. business enterprise or at a university, contact the author for the terms
  18. of registration.
  19.  
  20. The units are under development. Comments and contacts are solicited. If
  21. you have any feedback about this unit, please do not hesitate to use
  22. electronic mail for communication.
  23.  
  24. The author shall not be liable to the user for any direct, indirect or
  25. consequential loss arising from the use of, or inability to use, any unit,
  26. program or file howsoever caused. No warranty is given that the units and
  27. programs will work under all circumstances.
  28.  
  29. Timo Salmi (email: ts@uwasa.fi WWW: http://uwasa.fi/~ts/)
  30. Professor of Accounting and Business Finance
  31. Faculty of Accounting & Industrial Management
  32. University of Vaasa
  33. P.O. BOX 700, FIN-65101 Vaasa, Finland
  34. *)
  35.  
  36. unit TSUNTF;
  37.  
  38. (* ======================================================================= *)
  39.                           interface
  40. (* ======================================================================= *)
  41.  
  42. uses Dos,
  43.      Crt;
  44.  
  45. (* =======================================================================
  46.               The basic three editable readln routines
  47.    ======================================================================= *)
  48.  
  49. (* An enhanced readln with the possibility of editing input strings
  50.    using insert mode
  51.      The functional edit keys are
  52.        BackSpace
  53.        Del
  54.        CursorLeft
  55.        CursorRight
  56.        Home
  57.        End
  58.        Esc *)
  59. procedure EDRDLN (prompt : string; var InputString : string);
  60.  
  61. (* This version gives the possibility of recalling a string by pressing
  62.    the CursorUp key. Insert key is also functional *)
  63. procedure EDREADLN (prompt          : string;
  64.                     RecallString    : string;
  65.                     var InputString : string);
  66.  
  67. (* This is the most versatile of the enhanced readln. It has the same
  68.    characteristics as EDRDLN and EDREADLN, plus it detects whether the
  69.    break has been pressed. Furthermore, the maximum witdth of the screen
  70.    is given as a parameter (MaxLength) which is very useful if you
  71.    application makes windows.
  72. *)
  73. procedure EDREABLN (Prompt           : string;
  74.                     RecallString     : string;
  75.                     MaxLength        : integer;
  76.                     var InputString  : string;
  77.                     var BreakPressed : boolean);
  78.  
  79. (* =======================================================================
  80.      The editable readln routines versions with the pre-fill option
  81.    ======================================================================= *)
  82.  
  83. (* Same as EDREADLN, but with the pre-fill option available
  84.    Important, you must always assign a value to the PrefillString
  85.    before invoking this routine. Else you will have a random default
  86.    with unexpected results *)
  87. procedure EDRDEFLN (prompt          : string;
  88.                     RecallString    : string;
  89.                     PrefillString   : string;
  90.                     var InputString : string);
  91.  
  92. (* Same as EDREABLN, but with the pre-fill option available
  93.    Important, you must always assign a value to the PrefillString
  94.    before invoking this routine. Else you will have a random default
  95.    with unexpected results *)
  96. procedure EDRDEBLN (Prompt           : string;
  97.                     RecallString     : string;
  98.                     PrefillString    : string;
  99.                     MaxLength        : integer;
  100.                     var InputString  : string;
  101.                     var BreakPressed : boolean);
  102.  
  103.